package model;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

public class User {
    private BigDecimal id;

    private String username;

    private String password;

    private BigDecimal deptId;

    private String nickname;

    private String mobile;

    private Date birthday;

    private Date createTime;

    private BigDecimal createBy;

    private Date updateTime;

    private BigDecimal updateBy;

    private String deleted;

    private String sCreateTime;

    private String sBirthday;

    public BigDecimal getId() {
        return id;
    }

    public void setId(BigDecimal id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public BigDecimal getDeptId() {
        return deptId;
    }

    public void setDeptId(BigDecimal deptId) {
        this.deptId = deptId;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname == null ? null : nickname.trim();
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile == null ? null : mobile.trim();
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public BigDecimal getCreateBy() {
        return createBy;
    }

    public void setCreateBy(BigDecimal createBy) {
        this.createBy = createBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public BigDecimal getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(BigDecimal updateBy) {
        this.updateBy = updateBy;
    }
    public String getDeleted() {
        return deleted;
    }

    public void setDeleted(String deleted) {
        this.deleted = deleted == null ? null : deleted.trim();
    }

    public String getsCreateTime() {
        if(null != createTime){
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:MM:SS");
            return sdf.format(createTime);
        }else{
            return null;
        }
    }

    public void setsCreateTime(String sCreateTime) {
        this.sCreateTime = sCreateTime;
    }

    public String getsBirthday() {
        if(null != birthday){
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:MM:SS");
            return sdf.format(birthday);
        }else{
            return null;
        }
    }

    public void setsBirthday(String sBirthday) {
        this.sBirthday = sBirthday;
    }

    @Override
    public String toString() {
        return "User{" +
                "birthday=" + birthday +
                ", id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", deptId=" + deptId +
                ", nickname='" + nickname + '\'' +
                ", mobile='" + mobile + '\'' +
                ", createTime=" + createTime +
                ", createBy=" + createBy +
                ", updateTime=" + updateTime +
                ", updateBy=" + updateBy +
                ", deleted='" + deleted + '\'' +
                '}';
    }
}